home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.text.rtf;
-
- import java.util.Dictionary;
- import java.util.Enumeration;
-
- class RTFReader$FonttblDestination implements RTFReader.Destination {
- // $FF: synthetic field
- private final RTFReader this$0;
- int nextFontNumber;
- String nextFontFamily;
-
- RTFReader$FonttblDestination(RTFReader var1) {
- this.this$0 = var1;
- }
-
- public void begingroup() {
- }
-
- public void close() {
- Enumeration var1 = this.this$0.fontTable.keys();
- this.this$0.warning("Done reading font table.");
-
- while(var1.hasMoreElements()) {
- Integer var2 = (Integer)var1.nextElement();
- this.this$0.warning("Number " + var2 + ": " + this.this$0.fontTable.get(var2));
- }
-
- }
-
- public void endgroup(Dictionary var1) {
- }
-
- public void handleBinaryBlob(byte[] var1) {
- }
-
- public boolean handleKeyword(String var1) {
- if (var1.charAt(0) == 'f') {
- this.nextFontFamily = var1.substring(1);
- return true;
- } else {
- return false;
- }
- }
-
- public boolean handleKeyword(String var1, int var2) {
- if (var1.equals("f")) {
- this.nextFontNumber = var2;
- return true;
- } else {
- return false;
- }
- }
-
- public void handleText(String var1) {
- int var2 = var1.indexOf(59);
- String var3;
- if (var2 > 0) {
- var3 = var1.substring(0, var2);
- } else {
- var3 = var1;
- }
-
- this.this$0.fontTable.put(new Integer(this.nextFontNumber), var3);
- this.nextFontNumber = -1;
- this.nextFontFamily = null;
- }
- }
-